﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Web;

namespace CarRental.Helpers {
    public class Shared {
        private static LoginInfo __loginInfo;
        public static LoginInfo LoginInfo {
            get {
                if (__loginInfo == null) __loginInfo = new LoginInfo();
                return __loginInfo;
            }
            set {
                __loginInfo = value;
            }
        }
    }

    public class LoginInfo : INotifyPropertyChanged {
        public long UserId { get; set; }
        public string UserName { get; set; }
        public string UserType { get; set; }
        public string UserEmail { get; set; }
        public string LoginName { get; set; }
        public string UserPassword { get; set; }
        public string UserStatus { get; set; }
        public string UserContactNo { get; set; }
        public bool Authorized { get; set; }
       
        // Declare the PropertyChanged event
        public event PropertyChangedEventHandler PropertyChanged;
        // NotifyPropertyChanged will raise the PropertyChanged event passing the
        // source property that is being updated.
        public void NotifyPropertyChanged(string propertyName) {
            if (PropertyChanged != null) {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}